package month4.day24;

import java.text.SimpleDateFormat;
import java.util.Calendar;


public class C7 {
    public static void main(String[] args) {
        SimpleDateFormat s = new SimpleDateFormat("yyyy年MM月dd日 EE");
        Calendar c = Calendar.getInstance();
        Calendar a = Calendar.getInstance();
            for (int i = 0; i < 365; i++) {
                c.set(2022, 0, 1,8,0);
                c.add(Calendar.DAY_OF_YEAR,i);
                if (c.get(Calendar.DAY_OF_WEEK) == 7) {
                    a.set(c.get(Calendar.YEAR),c.get(Calendar.MONTH),c.get(Calendar.DATE));
                    a.add(Calendar.DAY_OF_YEAR,14);
                    if (c.get(Calendar.WEEK_OF_MONTH)==3&&a.get(Calendar.WEEK_OF_MONTH)==1){
                        System.out.println(s.format(c.getTime()));
                    }else if (c.get(Calendar.WEEK_OF_MONTH)==4&&a.get(Calendar.WEEK_OF_MONTH)==1){
                        System.out.println(s.format(c.getTime()));
                    }
                }
        }
    }
}
